package demo3;

public class Shape {
    public void draw(){}

}
class Cycle extends Shape{
    @Override
    public void draw() {
        System.out.println("⭕");
    }
}
class Triangle extends Shape{
    @Override
    public void draw() {
        System.out.println("▲");
    }
}
class Flower extends Shape{
    @Override
    public void draw() {
        System.out.println("❀");
    }
}
class test{
    public static void main(String[] args) {
        Flower flower=new Flower();
        Cycle cycle=new Cycle();
        Triangle triangle=new Triangle();
        Shape[] shapes={flower,cycle,triangle};
        for (Shape s:shapes
             ) {
            s.draw();
        }
    }
}
